package service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import dao.FoodDao;
import service.FoodService;
import vo.Food;
@Service("fs")
public class FoodServiceImpl implements FoodService{
	@Autowired
	private FoodDao fd;
	@Override
	@Transactional
	public int addFood(Food f) {
		
		return fd.addFood(f);
	}

	@Override
	public List<Food> foodAllFood(Integer mId) {
		
		return fd.findAllFood(mId);
	}

	@Override
	public List<Food> findRecommendFood(Integer mId, Integer fStatus) {
		
		return fd.findRecommendFood(mId, fStatus);
	}

	@Override
	@Transactional
	public int delFood(Integer fId) {
		
		return fd.delFood(fId);
	}

	@Override
	@Transactional
	public int updateFood(Food f) {
		
		return fd.updateFood(f);
	}

}
